package com.jan.activemq01.service;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;
public class MsgListener implements MessageListener{

	@Override
	public void onMessage(Message message) {
		TextMessage textMessage=(TextMessage) message;
		try {
			System.out.println("容器接收："+textMessage.getText());
		} catch (JMSException e) {
			e.printStackTrace();
		}
	}

}
